﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="UsuariosListado.aspx.cs" Inherits="Ubatic.Ui.Web.Pages.UsuariosListado" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" src="../Scripts/popupModal.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <asp:GridView ID="GridView" runat="server" AllowPaging="True" Width="100%" AutoGenerateColumns="False"
                OnRowCommand="GridView_RowCommand" OnPageIndexChanging="GridView_PageIndexChanging"
                OnRowDeleting="GridView_RowDeleting" CellPadding="4" ForeColor="#333333" GridLines="None">
                <AlternatingRowStyle BackColor="White" ForeColor="White" />
                <Columns>
                    <asp:BoundField DataField="Id" Visible="false" />
                    <asp:BoundField DataField="Apellido" HeaderText="Apellido" />
                    <asp:BoundField DataField="Nombre" HeaderText="Nombre" />
                    <asp:BoundField DataField="Email" HeaderText="Email" />
                    <asp:TemplateField HeaderText="Ver" HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                        <ItemTemplate>
                            <asp:ImageButton ID="View" runat="server" CommandArgument='<%# Eval("Id") %>' CommandName="View"
                                ImageUrl="~/Images/viewItem.png" HeaderText="Ver" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Editar" HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                        <ItemTemplate>
                            <asp:ImageButton ID="Edit" runat="server" HeaderText="Editar" CommandArgument='<%# Eval("Id") %>'
                                CommandName="Update" ImageUrl="~/Images/editItem.png" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Eliminar" HeaderStyle-Width="10%" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                        <ItemTemplate>
                            <asp:ImageButton ID="Delete" runat="server" HeaderText="Eliminar" CommandArgument='<%# Eval("Id") %>'
                                CommandName="Delete" ImageUrl="~/Images/delItem.GIF" OnClientClick="showConfirm(this); return false;" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <EmptyDataTemplate>
                    <asp:Label ID="EmptyDataLabel" runat="server" Text="No existen usuarios."></asp:Label>
                </EmptyDataTemplate>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#395B7E" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="div-top-grid">
        <asp:LinkButton ID="btnAgregarNuevo" CssClass="agregarNuevo" runat="server" OnClick="btnAddNew_Click">Agregar</asp:LinkButton>
    </div>
    <cc1:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mdlPopup" runat="server"
        TargetControlID="ConfirmPanel" PopupControlID="ConfirmPanel" OkControlID="btnOk"
        OnOkScript="okClick();" CancelControlID="btnNo" OnCancelScript="cancelClick();"
        BackgroundCssClass="modalBackground">
    </cc1:ModalPopupExtender>
    <div id="ConfirmPanel" runat="server" align="center" class="confirm" style="display: none;">
        <div>
            <asp:Image ID="Image1" runat="server" ImageUrl='~/Images/warning.png' />
            Desea borrar el registro?
        </div>
        <asp:Button ID="btnOk" runat="server" Text="Si" Width="50px" />
        <asp:Button ID="btnNo" runat="server" Text="No" Width="50px" />
    </div>
    <br class="clearBoth" />
    <asp:Label ID="lblError" runat="server" CssClass="mensaje-error"></asp:Label>
</asp:Content>
